<head>
<%= stylesheet_link_tag 'teststylesheet' %>
</head>

<%= render :active_scaffold => 'bug_lists', :constraints => {:project_id => @project.id} -%>


<script>

<% if !@project.is_logged_in_project_administrator? %>
		document.getElementById('bug_lists-new--link').innerHTML = '';
		document.getElementById('bug_lists-new--link').style.visibility = 'hidden';

	<% @project.bug_lists.each do |bug_list| %>
		document.getElementById('bug_lists-destroy-<%= bug_list.id.to_s %>-link').innerHTML = '';
		document.getElementById('bug_lists-edit-<%= bug_list.id.to_s %>-link').innerHTML = '';
	<% end -%>					 
<% else -%>
<% end -%>
</script>


<br />
<hr>
<br />

<h1 align="left"><a href="/projects">Projects</a> >> <a href="/projects/<%= @project.id %>"><%= @project.name %></a> >> Bug Lists</h1>
<% if @project.is_logged_in_project_administrator? %>
  <h2 class="link_bar" align="right"><img src="/images/add.gif" align="absmiddle"><a href="/bug_lists/new?id=<%= @project.id %>">Create New</a></h2>
<% else -%>
  <h2 class="link_bar"></h2>
<% end -%>

<table cellpadding="0" cellspacing="0">

  <thead>
  <tr>
    <th scope="col">Display Name</th>
    <th scope="col">Description</th>
    <th scope="col">Expert query</th>
    <th scope="col">Ownership Model</th>
    <th scope="col">Use Projections</th>
    <th scope="col">Use ownership change</th>
    <th scope="col">Is verifications list</th>
    <th scope="col" colspan="2"></th>
  </tr>
  </thead>
 
<!--  <tbody>														-->
<!--  <% @odd = true %>													-->
<!--  <% @project.bug_lists.each do |bug_list| %>									-->
<!--     <% if @odd %>													-->
<!--       <tr class="odd">												-->
<!--     <% else -%>													-->
<!--       <tr>														-->
<!--     <% end -%>													-->
    <%= render :partial => 'bug_list_draggable' %>
<!--       <td scope="row"><%= bug_list.display_name %></td>								-->
<!--       <td scope="row"><%= bug_list.description %></td>								-->
<!--       <td scope="row"><%= bug_list.expert_query %></td>								-->
<!--       <td scope="row"><%= bug_list.ownership_model.name %></td>							-->
<!--       <% if @project.is_logged_in_project_administrator? %>							-->
<!--         <td scope="row"><a href="/projections/index_for_bug_list/<%= bug_list.id %>">View/Edit</a></td>		-->
<!--       <% else -%>													-->
<!--         <td scope="row"><a href="/projections/index_for_bug_list/<%= bug_list.id %>">View</a></td>			-->
<!--       <% end -%>													-->
<!--       <td scope="row"><%= bug_list.use_ownership_change %></td>							-->
<!--       <% if @project.is_logged_in_project_administrator? %>							-->
<!--         <td scope="row"><%= bug_list.is_verification_list %></td>							-->
<!--         <td scope="row"><a href="/bug_lists/<%= bug_list.id %>/edit?id=<%= bug_list.id %>">Edit</a></td>		-->
<!--         <td scope="row"><%= link_to 'Delete', bug_list, :confirm => "Are you sure?", :method => :delete %></td>	-->
<!--       <% else -%>													-->
<!--         <td scope="row" colspan="3"><%= bug_list.is_verification_list %></td>					-->
<!--       <% end -%>													-->
<!--  </tr> 														-->
<!--    <% @odd = !@odd %>												-->
<!--  <% end %>														-->
<!--  </tbody>														-->

  <tfoot>
  <tr>
    <td colspan="9" align="left" ><%= @project.bug_lists.size %> Found</td>
  </tr>
  </tfoot>
</table>
